package main

import (
	"context"
	"fmt"
	trippd "goStudy/proto/gen/go"
	"google.golang.org/grpc"
	"google.golang.org/grpc/credentials/insecure"
	"log"
)

func main() {
	dial, err := grpc.Dial("localhost:8083", grpc.WithTransportCredentials(insecure.NewCredentials()))
	if err != nil {
		log.Fatal("失败")
	}
	client := trippd.NewTripServiceClient(dial)
	respone, err := client.GetTrip(context.Background(), &trippd.Rid{
		Id: "1",
	})
	if err != nil {
		log.Fatal("失败")
	}
	fmt.Print(respone)
}
